package com.minew.beaconset.utils;

import com.google.gson.Gson;

public class JsonUtil {

    public static String beanToJson(Object o){
        Gson gson = new Gson();
        return gson.toJson(o);
    }

    public static <T>T  jsonToBean(String json,Class cls){
        Gson gson = new Gson();
       return (T)gson.fromJson(json,cls);
    }
}
